package com.dingding.commonservice.facade.company;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dingding.common.core.beans.Organization;
import com.dingding.commonservice.core.company.service.ICompanyService;
import com.dingding.facade.commonservice.common.dto.company.ReqGetCompanyDTO;
import com.dingding.facade.commonservice.common.dto.company.ReqGetCompanyListDTO;
import com.dingding.facade.commonservice.common.dto.company.ResGetCompanyListDTO;
import com.dingding.facade.commonservice.facade.company.ICompanyFacade;

/**
 * 
 * @ClassName: CompanyFacadeImpl 
 * @Description: 公司服务接口实现类
 * @author YHQ
 * @date 2016年12月1日 下午5:35:41
 * @since V2.5.7
 * 
 */
@Component("companyFacade")
public class CompanyFacadeImpl implements ICompanyFacade{

	@Resource(name = "companyService")
	private ICompanyService companyService;
	
	/**
	 * 
	 * @Title: getCompanyListDTOs 
	 * @Description: 获取公司列表
	 * @param reqGetCompanyListDTO 客户端请求Bean
	 * @author YHQ 
	 * @since V2.5.7
	 * @return List<ResGetCompanyListDTO>    返回类型
	 * 
	 */
	public List<ResGetCompanyListDTO> getCompanyListDTOs(ReqGetCompanyListDTO reqGetCompanyListDTO) {
		
		return companyService.getCompanyListDTOs(reqGetCompanyListDTO);
	}

	@Override
	public ResGetCompanyListDTO getCompanyDTO(ReqGetCompanyDTO reqGetCompanyDTO) {
		
		return companyService.getCompanyDTOById(reqGetCompanyDTO);
	}

	/**
	 * 
	 * @Title: getOrganizationById 
	 * @Description: 根据机构id获取机构
	 * @param  参数说明 
	 * @author hufan
	 * @return 返回类型 
	 * @throws
	 */
	@Override
	public Organization getOrganizationById(Integer organizationId) {
		
		return companyService.getOrganizationById(organizationId);
	}

}
